#include<bits/stdc++.h>
using namespace std;
const int N=500050;
int a[111111];
int n;
bool cmp(int a,int b)
{
    return a>b;
}
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    for(int i=0;i<n;i++) cin>>a[i];
    sort(a,a+n,cmp);
    int ans=0;
    int j=n-1;
    for(int i=n-2;i>=0;i--){
        if(a[i]>a[j]){
            ans++;
            j--;
        }
    }
    ans=n-ans;
    cout<<ans<<endl;
    return 0;
}
